package com.zxc.gulimall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zxc.common.to.mq.SeckillOrderTo;
import com.zxc.common.utils.PageUtils;
import com.zxc.gulimall.order.entity.OrderEntity;
import com.zxc.gulimall.order.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author zxc
 * @email 2898743173@qq.com
 * @date 2021-10-27 09:59:14
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    //订单确认页返回需要的数据
    OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;

    OrderSubmitRespVo submitOrder(OrderSubmitVo vo);

    //根据订单号获取订单详情
    OrderEntity getOrderDetailByOrderSn(String orderSn);

    //订单取消
    void closeOrder(OrderEntity orderEntity);

    //获取当前订单的支付信息
    PayVo getOrderPay(String orderSn);

    PageUtils queryPageWithItem(Map<String, Object> params);

    /*
    * 处理支付宝的返回结果
    * */
    String handlePayResult(PayAsyncVo vo);

    void createSkillOrder(SeckillOrderTo seckillOrderTo);
}

